home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Night Owl 9
/
Night Owl CD-ROM (NOPV9) (Night Owl Publisher) (1993).ISO
/
015a
/
tidy10.zip
/
TIDY.TXT
< prev
next >
Wrap
Text File
|
1993-02-26
|
4KB
|
85 lines
TIDY
(A program to reduce clutter.)
No, It's not the latest in artificial intelligence and it won't
compress your files down to a zillionth of there original size but
TIDY is a useful tool that will help get rid of the clutter that
usually builds up on a hard disk.
TIDY is a variant of the DOS delete command. The intent here is not to
try to replace the delete command, but to add functionality that the
delete does not provide. First, with TIDY you specify the relative age
of the files to delete. TIDY will only remove files of that age (or
older). Second, TIDY won't ask you if it's OK to delete all the files
in a directory if that is what you specified. This way you can embed
the command in a batch file without having give conformation each
time it's run. I run TIDY from inside my AUTOEXEC.BAT file so that
each time I boot, all of the specified files will be tested to see if
they should be deleted.
The general syntax of the TIDY command is shown below:
C:\> tidy -NP file [file [...]]
where N = The number of units old (P) the file must be in order
to consider it for deletion.
P = The time unit: 'm' or 'M' for minutes; 'h' or 'H' for
hours; or 'd' or 'D' for days.
file = One or more path names (wild cards allowed) of files
to consider for deletion.
(You can also get a synopsis of the command syntax by typing the word
"tidy" by itself at the DOS prompt).
For example, assume that you have one directory you use only for
transitory files that you don't care much about called '\trash' and
another for backups of document and program source called '\backups'.
You might consider putting something like the following in your
AUTOEXEC.BAT file:
tidy -1h c:\trash\*.*
tidy -2d c:\backups\*.c
tidy -10d c:\backups\*.doc
This will (each time you boot) delete all files older than one hour in
the \trash directory as well as the C source code older that two days
and documents older than 10 days in the \backups directory.
OK, but you say: "The power failed while I was updating my 1992 tax
forms! The updated copy is no good and if I reboot (When the power
comes back) TIDY may delete my only backup!". Well, I guess you could
reboot from a floppy and save off an extra copy before booting from
the hard disk again but there is a better way. Reboot as usual and
after the computer beeps signaling the end of the ROM diagnostics,
depress and hold one of the Alt., Shift, or Ctrl keys until the
AUTOEXEC.BAT file completes. TIDY will sense your state of panic and
leave your backup unscathed.
I've added a second tool called TOUCH that you might find of use.
TOUCH will update the time stamp of the specified file(s) to the
current time. By using TOUCHING a file, you can forestall the effects
of TIDY when it runs because it doesn't look as old as it really is.
(TOUCH is useful for programmers that use a 'make' utility to force a
rebuild of a target file without having to change one of it's depend
files).
The legal stuff:
TIDY and TOUCH are offered as is, without cost, and WITHOUT WARRANTY
OF ANY KIND. Although I offer TIDY and TOUCH as 'FREE WARE', I retain
the copyright and all rights of authorship. Any damages resulting from
use of this software is limited to the payment you made to me
(nothing). You have the right to copy and distribute TIDY and TOUCH
together with this document so long as you include all of the original
files unaltered and do not charge a fee of any kind.
If you have questions or comments regarding TIDY or TOUCH contact
me on CompuServe (71571,14) or on the Shareware South BBS Atlanta GA
(404)370-0736
Enjoy, Ken Harrington